 //截取字符串部分信息
//截取字符串前Len位的字符串
function getStrBeforeLen(Str,Len){
      if(Str.length>Len){
            return Str.substr(0,Len)+"...";
      }else{
            return Str;
      }      
}
//筛除html里的标签
function removeHtmlStr(str) {
        str = str.replace(/<!--[\w\W\r\n]*?-->/gmi, ''); //去除HTML注释
	str = str.replace(/<\/?[^>]*>/g,''); //去除HTML tag
	str = str.replace(/[ | ]*\n/g,'\n'); //去除行尾空白
	str = str.replace(/\n[\s| | ]*\r/g,'\n'); //去除多余空行
	str=str.replace(/ /ig,'');//去掉		
	str=str.replace(/&nbsp;/ig,' ');//去掉				
	return str;
}

//格式化到时分秒
function timestampToTime_sfm(timestamp) {	
			if (timestamp>0){
			 var datetime = new Date();
		     datetime.setTime(timestamp);
		     var year = datetime.getFullYear();
		     var month = datetime.getMonth() + 1 < 10 ? "0" + (datetime.getMonth() + 1) : datetime.getMonth() + 1;
		     var date = datetime.getDate() < 10 ? "0" + datetime.getDate() : datetime.getDate();
		     var hour = datetime.getHours()< 10 ? "0" + datetime.getHours() : datetime.getHours();
		     var minute = datetime.getMinutes()< 10 ? "0" + datetime.getMinutes() : datetime.getMinutes();
		     var second = datetime.getSeconds()< 10 ? "0" + datetime.getSeconds() : datetime.getSeconds();
		     return year + "-" + month + "-" + date+" "+hour+":"+minute+":"+second;
		    // return year + "-" + month + "-" + date;
			}
			else{
				return "";
			}

	   }